package com.pocketsweet.model;

import com.avos.avoscloud.AVClassName;
import com.avos.avoscloud.AVObject;
import com.pocketsweet.C;
import com.pocketsweet.service.UserService;

@AVClassName("MLCustomizationRecord")
public class MLCustomizationRecord extends AVObject {
	public static final String PRICE = "price";
	public static final String TYPE = "type";
	public static final String SPONSOR = "sponsor";
	public static final String WINNER = "winner";
	public static final String STATUS = "status";
	public static final String COST = "cost";
	public static final String TIME = "time";

	public MLCustomizationRecord() {
	}

	// //////////////////////////////////////////
	// 外键
	// //////////////////////////////////////////
	public MLUser getSponsor() {
		return (MLUser) super.getAVUser(SPONSOR);
	}

	public void setSponsor(MLUser user) {
		super.put(SPONSOR, user);
	}
	
	public MLUser getWinner() {
		return (MLUser) super.getAVUser(WINNER);
	}
	
	public void setWinner(MLUser user) {
		super.put(WINNER, user);
	}

	// 用户设置的价格
	public void setPrice(double value) {
		super.put(PRICE, value);
	}

	public double getPrice() {
		return super.getDouble(PRICE);
	}

	public int getType() {
		return super.getInt(TYPE);
	}

	public void setType(int value) {
		super.put(TYPE, value);
	}

	public int getStatus() {
		return super.getInt(STATUS);
	}

	public void setStatus(int value) {
		super.put(STATUS, value);
	}
	public int getTime() {
		return super.getInt(TIME);
	}
	
	public void setTime(int value) {
		super.put(TIME, value);
	}

	public double getCost() {
		return super.getInt(COST);
	}

	public void setCost(double totalCost) {
		super.put(COST, totalCost);
	}

}
